package com.youngwang.system.runtime;

/**
 * @author youngwang
 *         Date: 2016/8/31
 */
public class RuntimeTest {

    public static void main(String[] args){
        int coreCpu = Runtime.getRuntime().availableProcessors();
        System.out.println(coreCpu);
        System.out.println(Runtime.getRuntime().totalMemory());
        System.out.println(Runtime.getRuntime().freeMemory());
        System.out.println(Runtime.getRuntime().maxMemory());
        Runtime.getRuntime().gc();
        System.out.println(Runtime.getRuntime().totalMemory());
        System.out.println(Runtime.getRuntime().freeMemory());
        System.out.println(Runtime.getRuntime().maxMemory());


}
}
